#ifndef XSPRITE_H
#define XSPRITE_H

#ifdef XEXPORTING
#define XEXPORT_DLL __declspec(dllexport)
#else
#define XEXPORT_DLL __declspec(dllimport)
#endif

#include <string>
#include <vector>
#include <XMain.h>
#include <XTexture.h>
#include <XFont.h>


class XEXPORT_DLL XSprite
{
private:
	unsigned int VertexBuffer;
	unsigned int IndexBuffer;

	void _initBuffers();
	void _freeBuffers();

	XRectangle LastPosition;
	XRectangle LastClip;
public:
	XSprite();
	~XSprite();

	void Draw(XRectangle pos);
	void Draw(XRectangle pos, XTexture* tex);
	void Draw(XRectangle pos, XTexture* tex, XRectangle texClip);

	void DrawString(XRectangle pos, XFont* font, std::string text);

	friend class XGraphicModule;
};

#endif